/******************************************************;
**This do file creates data from the 2010 Form 3 Census on number of nurses

******************************************************/

capture clear
clear matrix
clear mata
capture macro drop _all
set mem 1000m
set more off

#delimit ;

***SET DIRECTORY STRUCTURE***;
global data 
global data_save 

******************************************************;
*2010 Census;
use "${data}2010_Census_Form3.dta", clear;

*drop ofws;
drop if ofw==1;


*OCCUPATION AND NURSE DEGREE VARIABLES;
gen nurse=1 if usual_occ==2231|usual_occ==3231;
gen nurse_midwife=1 if usual_occ==2231|usual_occ==3231|usual_occ==2232|usual_occ==3232;


*COLLAPSE DATA TO GET COUNTS OF NURSES, HEALTH DEGREES, AND THOSE ATTENDING SCHOOL OUT OF PROVINCE BY PROVINCE;
collapse (sum) nurse nurse_midwife [pw=popwght], by(prv);

gen year=2010;

save "${data_save}Census_2010_nurse.dta", replace;



